package com.baoyouqun.service;

import com.alibaba.cola.dto.Response;
import com.alibaba.cola.dto.SingleResponse;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baoyouqun.domain.CreateCmd.UserAddressCreateCmd;
import com.baoyouqun.domain.Query.UserAddressQuery;
import com.baoyouqun.domain.UpdateCmd.UserAddressUpdateCmd;
import com.baoyouqun.domain.VO.UserAddressVO;
import com.baoyouqun.entity.UserAddress;

public interface UserAddressService extends IService

        <UserAddress> {

    /**
     * 新增并返回实体
     */
    SingleResponse<UserAddressVO> create(UserAddressCreateCmd cmd);

    Response update(UserAddressUpdateCmd cmd);

    /**
     * 根据ID查询VO
     */
    UserAddressVO selectById(String id);

    /**
     * 分页查询VO
     */
    IPage<UserAddressVO> pageVo(UserAddressQuery query);

    UserAddress getByUserId(String userId);
}